package com.yaoayao.mall.activity.redis;

import org.springframework.stereotype.Component;

/**
 * @Author: 李旭
 * @Time: 15:20
 * @Description:
 *
 *   Redis监听器 接收到消息 自定义的处理实现类
 */
@Component
public class MessageReceive {


    //接收消息
    public void receiveMessage(String message){
        System.out.println("redis:message:" + message);//   "30:1"
        //本地内存中  JUC   "30   1"
        String[] split = message.replaceAll("\"","").split(":");
        CacheHelper.put(split[0],split[1]);
    }

}
